package jwebtester.dal.entities;

// Generated Oct 31, 2012 3:54:40 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * AuthenticationHistoryEntity generated by hbm2java
 */
@Entity
@Table(name = "AUTHENTICATION_HISTORY", schema = "PUBLIC", catalog = "PUBLIC")
public class AuthenticationHistoryEntity implements java.io.Serializable {

	private Integer id;
	private AuthenticationEntity authenticationEntity;
	private Date authDate;
	private boolean success;

	public AuthenticationHistoryEntity() {
	}

	public AuthenticationHistoryEntity(AuthenticationEntity authenticationEntity, Date authDate,
			boolean success) {
		this.authenticationEntity = authenticationEntity;
		this.authDate = authDate;
		this.success = success;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AUTH_ID", nullable = false)
	public AuthenticationEntity getAuthenticationEntity() {
		return this.authenticationEntity;
	}

	public void setAuthenticationEntity(AuthenticationEntity authenticationEntity) {
		this.authenticationEntity = authenticationEntity;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "AUTH_DATE", nullable = false, length = 26)
	public Date getAuthDate() {
		return this.authDate;
	}

	public void setAuthDate(Date authDate) {
		this.authDate = authDate;
	}

	@Column(name = "SUCCESS", nullable = false)
	public boolean isSuccess() {
		return this.success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

}
